<link rel="stylesheet" type="text/css" href="{$smarty.const.URL_BASE}/modules/abbannermodule/css/abbannermodule.css" />

{if $in_admin_mode == 1}
<div class="abbannermodule" style="width: {$config->mwidth}px; height: {$config->mheight}px;">
    <ul class="default">
        <li class="manage"><a class="tip" title="Resource Management" href="{link action=list module=abbannermodule}">{$_TR.re_manage}</a></li>
        <li class="configure"><a class="tip" title="Configure this module"  href="{link action=configure _common=1}">{$_TR.config}</a></li>
    </ul>
</div>
{elseif $item != 0}
	{if $config->show_type == 0}
		{* For text *}
		<div class="abbannermodule" style="width: {$config->mwidth}px; height: {$config->mheight}px;">
			{$item->text_value}
		</div>
	{elseif $config->show_type == 1}
		{if $config->rotator == 6}
			    {* Two Banners image *}
			    <div>
				    {foreach from=$item item=link}
				    <a href="{$link->img_linkurl}" title="{$link->title}" >  
					    <img src="{$smarty.const.BASE_URL}/phpThumb.php?src={$link->img_path}&w={$rotator_6_width}" width="{$rotator_6_width}px" height="{$rotator_6_height}px" title="{$link->title}">
				    </a>
				    {/foreach}
				    <div class="clear">
			    </div>
		    {else}{* For every show type other than Two Banners image *}
			    {* For img *}
		    <link rel="stylesheet" type="text/css" href="{$smarty.const.URL_BASE}/modules/abbannermodule/nivoslider/nivo.css" />
		    <script src="{$smarty.const.URL_BASE}/modules/abbannermodule/nivoslider/jquery.nivo.slider.pack.js" type="text/javascript"></script>
             <div class="left_border"></div>
             <div class="right_border"></div>
		    <div class="abbannermodule css3gradient_cccccc_fefefe" style="width: {$config->mwidth}px; height: {$config->mheight}px;">
			    <div id="slider" class="nivoSlider">
			    {foreach from=$item item=link}
				    <a href="{$link->img_linkurl}" title="{$link->title}" >  
					    <img src="{$smarty.const.BASE_URL}/phpThumb.php?src={$link->img_path}&w={$config->mwidth}" width="{$config->mwidth}px" height="{$config->mheight}px" title="{$link->title}">
				    </a>
			    {/foreach}
			    </div>
		    </div>
            <div class="clear"></div>
		    {literal}
			    <script type="text/javascript">
				    jQuery(window).load(function() {
					    jQuery('#slider').nivoSlider({
						    animSpeed:500,
						    controlNav: true,
                            directionNavHide: true
					    });
				    });
			    </script>
			    <style>
				    #slider a img, #slider, #slider-wrapper{
					    width: {/literal}{$config->mwidth}{literal}px;
					    height: {/literal}{$config->mheight}{literal}px;
				    }
			    </style>
		    {/literal}
		{/if}
	{elseif $config->show_type == 2}
		{* For flash *}
		<a href="{$item->flash_linkurl}">
		<embed height="{$config->mheight}" width="{$config->mwidth}" allowscriptaccess="always" wmode="transparent" loop="true" play="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"  src="{$item->flash_path}">
		</a>
    {elseif $config->show_type == 3}
    {*FOR HTML - sonhb Nov 8,2012 - start*}
    {foreach from=$item item=link}
        {if $link->show_type = 0}
        
    {/foreach}
    
    {*FOR HTML - sonhb Nov 8,2012 - end*}
	{/if}
{/if}